

import java.util.Scanner;

public class PointTest {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);

        System.out.print("请输入第一个坐标点");
        String str1 =sc.next();   //输入的应为x，y的格式。
        String[] string1= str1.split(",");
        double x1=Double.valueOf(string1[0]);
        double y1=Double.valueOf(string1[1]);
        Point p1=new Point(x1, y1);

        System.out.print("请输入第二个坐标点");
        String str2 =sc.next();   //输入的应为x，y的格式。
        String[] string2= str2.split(",");
        double x2=Double.valueOf(string2[0]);
        double y2=Double.valueOf(string2[1]);
        Point p2=new Point(x2, y2);

        System.out.print(Point.distance(p1, p2));
    }
}
